/**
 * @filename:Checkcode 2021年9月14日
 * @project WishStar  V1.0
 * Copyright(c) 2020 huang Co. Ltd. 
 * All right reserved. 
 */
package com.huang.wishstar.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;

/**   
 * @Description:TODO(验证码表实体类)
 * 
 * @version: V1.0
 * @author: huang
 * 
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Checkcode extends Model<Checkcode> {

	private static final long serialVersionUID = 1631617151758L;
	
	@TableId(value = "id", type = IdType.AUTO)
	@ApiModelProperty(name = "id" , value = "主键id")
	private Integer id;
    
	@ApiModelProperty(name = "mail" , value = "邮箱")
	private String mail;
    
	@ApiModelProperty(name = "code" , value = "验证码")
	private String code;
    
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@ApiModelProperty(name = "date" , value = "发送验证码的时间")
	private Date date;
    
	@ApiModelProperty(name = "isOvertime" , value = "是否过期，0过期，1未过期")
	private Integer isOvertime;
	@Override
    protected Serializable pkVal() {
        return this.id;
    }
}
